import { RMIObject } from "../../Engine/RMI/RMIObject";
import { SerializeStream } from "../../Framework/Serialize/SerializeStream";
import { SPublicMiniPlayer } from "../Public/SPublicMiniPlayer";
import { Exception } from "../../Framework/Util/Exception";
//class AMI_IPlayer_find
    
    export  class AMI_IPlayer_find extends RMIObject
    {
        constructor(arg1?: Function, arg2?: Function, arg3?: any)
        {
            super(arg1, arg2);
            this.userObject = arg3;
            this.callFunction = "find";
            return;
        }

        public /* override */ __response(arg1: SerializeStream): void
        {
            var __is: SerializeStream;
            var miniPlayer: SPublicMiniPlayer;
            var __ret: Boolean;

            var loc1;
            miniPlayer = null;
            __ret = false;
            __is = arg1;
            try 
            {
                miniPlayer = new SPublicMiniPlayer();
                miniPlayer.__read(__is);
                __ret = __is.readBool();
            }
            catch (__ex)
            {
                this.cdeException(new Exception("ExceptionCodeSerialize", Exception.ExceptionCodeSerialize));
                return;
            }
            this.cdeResponse(__ret, miniPlayer);
            return;
        }

        public cdeResponse(arg1: Boolean, arg2: SPublicMiniPlayer): void
        {
            if (this._response)  
            {
                this._response.call(null, this, arg1, arg2);
            }
            return;
        }
    }
